Skip to content

Conversation

@Sergio0694
Copy link
Member

This PR moves the workflow for the build pipeline from Azure DevOps to GitHub Actions.

@Sergio0694 Sergio0694 requested a review from Arlodotexe July 7, 2025 17:22
@Sergio0694 Sergio0694 added the CI/pipeline 🔬 Some changes or issues related to CI infrastructure label Jul 7, 2025
@michael-hawker
Copy link
Member

michael-hawker commented Nov 5, 2025

@Sergio0694 this should be what you need, you have different conditions a bit than we do for when things trigger (we only trigger on specific branches for instance). But otherwise I think this is all setup for you. I don't think it'll run until it's merged though.

This logic does the following:

  • Upload build packages as artifacts
  • If it's a PR, pushes them to PR feed on ADO Artifacts PullRequests feed
  • If it's integration to main, signs and then pushes to ADO Artifacts MainLatest feed
  • If it's a rel/* release branch, signs them, pushes to ADO Artifacts MainLatest feed, and then waits for the nuget-release-gate sign-off (this gives you time to check the packages on MainLatest for instance), once approved, it'll push to nuget.org

This is the same setup we have for WCT. @Arlodotexe feel free to take a quick look in case I missed something (as we have matrix vs. single bits).

Copy link
Contributor

@echoix echoix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some actions here already have newer published versions.

I furthermore reviewed the whole workflow, but not in a dotnet usage point of view, but in a GitHub Actions workflow usage point of view. I have a couple of suggestions, even before using any kind of linter.

steps:
- name: Git checkout
uses: actions/checkout@v4

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with:
persist-credentials: false

Since no git push operations are performed, it is a good practice to not have the credentials kept in the git config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points, we should look into all these in a follow up. Same for the other comments below 🙂

path: ./packages

- name: Install Signing Tool
run: dotnet tool install --tool-path ./tools sign --version 0.9.1-beta.25379.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plan a way to keep this tool's version updated. Having it hardcoded to a specific version, beta on top of that, is a little smelly.

In repos that use renovate (not the case here), I would've have seen an env var with that version, and the env var definition having a comment linking back to the source of the project, so updates could be done.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK the .NET sign tool only has beta versions so far. @ChrisSfanos is this anything you know about?

Comment on lines +20 to +21

jobs:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Potential improvement: define a global permission key with the common base permissions for all jobs explicitly, or clear the default permissions with {}. Then, in each job, explicitly list the permissions needed and wanted.

This helps when changing the workflow later on, like adding a job, to not have too much permissions.

Also, combine this with a review of the repo's GitHub Actions settings. Some older existing repos have more permissive defaults than newer repos/forks, and these will not limit as much the default permissions to read for contents and packages (usually enough as a default). The change happened a couple years ago

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-default-github_token-permissions

Sergio0694 and others added 2 commits November 5, 2025 10:58
Co-authored-by: Edouard Choinière <[email protected]>
Standardized job and step names in the CI workflow for clarity and consistency. Updated .NET SDK installation to use global.json instead of a hardcoded version. Improved comments and formatting for better maintainability.
@Sergio0694 Sergio0694 merged commit d4a2700 into main Nov 5, 2025
2 checks passed
@Sergio0694 Sergio0694 deleted the dev/gh-actions-migration branch November 5, 2025 19:16
@michael-hawker
Copy link
Member

@Arlodotexe mind looking at the feedback here that could be applied, but also to the WCT repos?

@echoix
Copy link
Contributor

echoix commented Nov 7, 2025

@Arlodotexe mind looking at the feedback here that could be applied, but also to the WCT repos?

I looked very shortly yesterday on that other repo to see what was different, and I noticed two actions I didn’t know about. One of them is clearly marked unmaintained and says to look for alternatives

@ChrisSfanos
Copy link

I know the owner of the signing tool doesn't get a lot of time to work on it, but it's been stable and working for many maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/pipeline 🔬 Some changes or issues related to CI infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants